code level diagnostics